<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
      
<ui:composition template="/restrito/template.xhtml">

<ui:define name="menu"><ui:include src="menu.xhtml"/></ui:define>

<ui:define name="corpo">
<div class="container">
	<ui:include src="../mensagem.xhtml"/>
	<h:form id="f">
    	<table class="table table-striped table-bordered tabela centralizado">
    	<thead>
    		<tr>
    			<th colspan="7">Usuários profissional</th>
	    	</tr>
    		<tr>
    			<th>Nome</th>
    			<th>E-mail</th>
    			<th>CPF</th>
    			<th>Telefone</th>
    			<th>Data cadastro</th>
    			<th>Data ult. acesso</th>
    			<th></th>
	    	</tr>
	    </thead>
	    <tbody>
	    	<ui:repeat var="e" value="#{consultarUsuarioProfissionalMB.lsUsuarioProfissional}" varStatus="i">
    		<tr>
    			<td>#{e.nome}</td>
    			<td>#{e.email}</td>
    			<td>#{e.cpf}</td>
    			<td>#{e.telefoneCelular}</td>
    			<td><h:outputText value="#{e.dataCadastro}"><f:converter converterId="conversorDataHora"/></h:outputText></td>
    			<td><h:outputText value="#{e.dataUltimoAcesso}"><f:converter converterId="conversorDataHora"/></h:outputText></td>
    			<td>
    				<a4j:commandLink value="cancelar" action="#{consultarUsuarioProfissionalMB.excluir}" render="f" onclick="if(!confirm('Tem certeza que deseja excluir esse usuário?'))return false;">
    					<f:param name="idUsuarioProfissional" value="#{e.idUsuarioProfissional}" />
    				</a4j:commandLink>
    			</td>
	    	</tr>
	    	</ui:repeat>
	    </tbody>
 		</table>
    </h:form>
</div>
</ui:define>
</ui:composition>
</html>
